import request from '@/utils/request'

// 获取总体统计概览
export function getTokenOverview(dateRange) {
  return request.get('/management/system/token-stats/overview', { params: { dateRange }})
}

// 获取用户token使用排行
export function getUserRanking(data) {
  return request.post('/management/system/token-stats/user-ranking', data)
}

// 获取模型使用统计
export function getModelStats(dateRange) {
  return request.get('/management/system/token-stats/model-stats', { params: { dateRange }})
}

// 导出统计数据
export function exportTokenStats(dateRange) {
  return request.get('/management/system/token-stats/export', {
    params: { dateRange },
    responseType: 'blob'
  })
}
